<?php 
/**
 * TomatoCMS
 * 
 * LICENSE
 *
 * This source file is subject to the GNU GENERAL PUBLIC LICENSE Version 2 
 * that is bundled with this package in the file LICENSE.txt.
 * It is also available through the world-wide-web at this URL:
 * http://www.gnu.org/licenses/gpl-2.0.txt
 * If you did not receive a copy of the license and are unable to
 * obtain it through the world-wide-web, please send an email
 * to license@tomatocms.com so we can send you a copy immediately.
 * 
 * @copyright	Copyright (c) 2009-2010 TIG Corporation (http://www.tig.vn)
 * @license		http://www.gnu.org/licenses/gpl-2.0.txt GNU GENERAL PUBLIC LICENSE Version 2
 * @version 	$Id: add.phtml 3032 2010-05-25 08:00:42Z huuphuoc $
 */
?>
<?php 
$this->headTitle($this->translator('order_add_page_title'));
$this->headScript()->appendFile($this->APP_STATIC_SERVER.'/js/jquery.validate/jquery.validate.min.js');
?>

<div class="grid_12 t_a_breadcump">
	<span><a href="<?php echo $this->url(array(), 'core_index_dashboard'); ?>"><?php echo $this->translator('menu_admin', 'core'); ?></a></span>
	<span><a href="<?php echo $this->url(array(), 'order_order_list'); ?>"><?php echo $this->translator('order_list_breadcump'); ?></a></span>
	<span><?php echo $this->translator('order_add_breadcump'); ?></span>	
</div>

<div class="grid_12"><?php echo $this->flashMessenger(); ?></div>

<form method="post" action="<?php echo $this->url(array(), 'order_order_add'); ?>" id="addorderForm" class="t_a_form">
<div class="grid_12 t_a_bottom"><?php echo $this->translator('order_add_guide'); ?></div>

<div class="grid_12 t_a_bottom">
	<div class="clearfix t_a_bottom">
		<div class="grid_2 alpha"><label><?php echo $this->translator('order_admin_name'); ?>:</label></div>
		<div class="grid_10 omega"><input type="text" id="order_admin_name" name="order_admin_name" style="width: 400px" /></div>
	</div>
	
	<div class="clearfix t_a_bottom">
		<div class="grid_2 alpha"><label><?php echo $this->translator('order_status'); ?>:</label></div>
		<div class="grid_10 omega">
			<select id="order_status" name="order_status" style="width:100px">
				<option value="">---</option>
				<option value="1"><?php echo $this->translator('order_status_active'); ?></option>
				<option value="0"><?php echo $this->translator('order_status_inactive'); ?></option>				
			</select>
		</div>
	</div>	
	
	<div class="clearfix t_a_bottom">
		<div class="grid_2 alpha"><label><?php echo $this->translator('order_price'); ?>:</label></div>
		<div class="grid_10 omega"><input type="text" id="order_price" name="order_price" style="width: 400px" /></div>
	</div>
	
	<div class="clearfix t_a_bottom">
		<div class="grid_2 alpha"><label><?php echo $this->translator('order_price_currency'); ?>:</label></div>
		<div class="grid_10 omega">
			<select id="order_price_currency" name="order_price_currency" style="width:100px">
				<option></option>
			</select>
		</div>
	</div>	
	
	<div class="clearfix t_a_bottom">
		<div class="grid_2 alpha"><label><?php echo $this->translator('order_status_of_delivery'); ?>:</label></div>
		<div class="grid_10 omega">
			<select id="order_status_of_delivery" name="order_status_of_delivery" style="width:100px">
				<option value="">---</option>
				<option value="deliver_able"><?php echo $this->translator('order_status_of_delivery_deliverable'); ?></option>
				<option value="non_deliver_able"><?php echo $this->translator('order_status_of_delivery_non_deliverable'); ?></option>
				<option value="please_contact"><?php echo $this->translator('order_status_of_delivery_please_contact'); ?></option>
			</select>
		</div>
	</div>
	
	<div class="clearfix t_a_bottom">
		<div class="grid_2 alpha"><label><?php echo $this->translator('order_quantity_mode'); ?>:</label></div>
		<div class="grid_10 omega">
			<select id="order_quantity_mode" name="order_quantity_mode" style="width:100px" disabled>
				<option value="">---</option>
				<option value="infinity"><?php echo $this->translator('order_quantity_mode_infinity'); ?></option>
				<option value="amount"><?php echo $this->translator('order_quantity_mode_amount'); ?></option>
			</select>
		</div>
	</div>	
	
	<div class="clearfix t_a_bottom">
		<div class="grid_2 alpha"><label><?php echo $this->translator('order_quantity'); ?>:</label></div>
		<div class="grid_10 omega"><input type="text" disabled id="order_quantity" name="order_quantity" style="width: 400px" /></div>
	</div>	
	
	<div class="clearfix t_a_bottom">
		<div class="grid_2 alpha"><label><?php echo $this->translator('order_image'); ?>:</label></div>
		<div class="grid_10 omega">
			<!--<input type="file" id="category_image" name="category_image" />-->
			<?php
				/**
				 * Allows user to browse uploaded file
				 * @since 2.0.4
				 */
				/*echo $this->browser('/upload/news/'.Zend_Auth::getInstance()->getIdentity()->user_name.'/'.date('Y').'/'.date('m'), 'jpg,gif,png', 'insertImage(%s)');*/
			?>
		</div>
	</div>	
	
	<div class="clearfix t_a_bottom">
		<div class="grid_2 alpha"><label><?php echo $this->translator('order_created_date'); ?>:</label></div>
		<div class="grid_10 omega"><?php echo $this->date;?></div>
	</div>
	
	<div class="clearfix t_a_bottom">
		<div class="grid_2 alpha"><label><?php echo $this->translator('order_modified_date'); ?>:</label></div>
		<div class="grid_10 omega"><?php echo $this->date;?></div>
	</div>	
	
	<div class="clearfix t_a_bottom">
		<div class="grid_2 alpha"><label><?php echo $this->translator('order_category'); ?>:</label></div>
		<div class="grid_10 omega">
			<div style="border:1px solid #CCC; padding: 5px; width:300px;overflow:auto;height:120px">
			    <?php for ($i = 0; $i < count($this->categories); $i++) : ?>
			     <input class="category_checkbox" type="checkbox" id="category_id[]" name="category_id[]" value="<?php echo $this->categories[$i]->category_id; ?>"> <?php echo str_repeat('---', $this->categories[$i]->depth).$this->categories[$i]->category_admin_name; ?><br>
			    <?php endfor; ?>
		   </div>
		</div>
	</div>
	
	<div class="grid_10 prefix_2 alpha">
		<input type="submit" class="t_a_button" value="<?php echo $this->translator('order_add_save_button'); ?>" />&nbsp;&nbsp;&nbsp;&nbsp;
		<input type="reset" class="t_a_button" value="<?php echo $this->translator('order_reset_button'); ?>" />
	</div>	
</div>
</form>

<script type="text/javascript">

$(document).ready(function() {
	
})	
</script>
